package model

import (
	"github.com/wdaglb/korm/sqltype"
)

type Admin struct {
	Id int64 `json:"id"`
	Username string `json:"username"`
	Password string `json:"password"`
	Avatar string `json:"avatar"`
	Nickname string `json:"nickname"`
	LoginTime sqltype.Timestamp `json:"login_time"`
	LoginFail int `json:"login_fail"`
	LoginFailTime sqltype.Timestamp `json:"login_fail_time"`
	CreateTime sqltype.Timestamp `json:"create_time"`
	UpdateTime sqltype.Timestamp `json:"update_time"`
}
//
//// GetGroupList 获取所属分组列表
//func (t *Admin) GetGroupList() []string {
//	list, err := core.Enforcer.GetRolesForUser(fmt.Sprintf("group:%s", t.Username))
//	if err != nil {
//		return []string{}
//	}
//	return list
//}
